const express = require('express');
const bodyParser = require('body-parser');
const session = require('express-session');

var app = express();
app.use(express.static('./public'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded());
app.use(session({secret: 'abc'}));


var merchantRouter = require('../routes/merchant.server.route');
var orderRouter = require('../routes/order.server.route');
var userRouter = require('../routes/user.server.route');
var dishRouter = require('../routes/dish.server.route');
var cartRouter = require('../routes/cart.server.route');


app.use('/CHa',merchantRouter);
app.use('/CHa',orderRouter);
app.use('/CHa',userRouter);
app.use('/CHa',dishRouter);
app.use('/CHa',cartRouter);



module.exports = app;